<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@page isELIgnored="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import="java.util.List" %>
<%@ page import="Entity.RoomHelp" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'SelectRoom.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">  <!-- 以上代码告诉IE浏览器，IE8/9及以后的版本都会以最高版本IE来渲染页面。 -->  
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>计算机实验室预约系统——联系管理员</title>
	<link rel="stylesheet" href="http://localhost:8080/OpenExperimentManagementSystem/css/normalize.css">
	<link rel="stylesheet" href="http://localhost:8080/OpenExperimentManagementSystem/css/common.css">

  </head>
  
  
  
  <body style="background:url(http://localhost:8080/OpenExperimentManagementSystem/images/back6.jpg);background-size:100% 100% ; background-attachment: fixed"
  style="padding:20px;">
	<header>
		<div class="logo">
		<a href="http://cs.njust.edu.cn/">
			<img src="http://localhost:8080/OpenExperimentManagementSystem/images/cslogo.png" style="width: 80px;height: 80px;margin-left: 250px;margin-top: 20px;" >
		</a>
			<h1 class="vertical-center">开放性实验辅助管理系统</h1>
		</div>
		<div class="logoff">
			<a href="#"><span><em class="username">${uname}</em>（<em class="usernum">${uid}</em>）</span></a>
			<a href="LoginServlet?op=exit" id="logout"><img src="http://localhost:8080/OpenExperimentManagementSystem/images/out.png" alt="退出登录"></a>
		</div>
	</header><!-- header结束 -->
	<div class="container" style="margin:20px auto;">
		<div class="content">
			
			<div class="M00" style="min-height: 400px; _height: 400px;">
			    <table width="100%"  border="0" cellspacing="1" cellpadding="0" bgcolor="#e1e1e1" class="List_T">
			        <tr>
			            <td align="center" bgcolor="#b8b8b8">
			                <strong>机房号</strong>
			            </td>
						<td align="center" bgcolor="#b8b8b8">
						    <strong>总数</strong>
						</td>
						<td align="center" bgcolor="#b8b8b8">
						    <strong>剩余数</strong>
						</td>
						<td align="center" bgcolor="#b8b8b8">
						    <strong>预约</strong>
						</td>
			        </tr>
			      <input type="hidden" value="${rlist}">         
				<c:forEach items="${rlist}" var = "e">				
					<tr>
						<td align="center" bgcolor="#FFFFFF">
							${e.roomid}
					    </td>
					    <td align="center" bgcolor="#FFFFFF">
							${e.total}
					    </td>
					    <td align="center" bgcolor="#FFFFFF">
							${e.leftSum}
					    </td>
					    <td align="center" bgcolor="#FFFFFF">
					    	<a href="servlet/BookExpServlet?selweek=${param.selweek}&selday=${param.selday}&selsection=${param.selsection}&selroom=${e.roomid}&eid=${param.eid}">预约</a>
					    </td>
					</tr>
        	</c:forEach>              
				</table>
			</div>	
		</div>
	</div>
</script>
</body>
</html>
